package com.itmuch.cloud.feign;

import com.itmuch.cloud.entity.User;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @author: chenhs
 * @date: Created in 10:51 2020/1/23
 **/
@FeignClient("microservice-provider-user")
public interface UserFeignClient {

    /**
     * @GetMapping("/simple/{id}") 听说这是一个坑
     *
     * @param id
     * @return
     */
    @RequestMapping(value = "/simple/{id}", method = RequestMethod.GET)
    User findById(@PathVariable("id") Long id);


    @RequestMapping(value = "/user", method = RequestMethod.POST)
    User postUser(@RequestBody User user);




}
